﻿Public Class Display
    Public Sub CreateTextObj(ByVal txtName As String)
        WindowerTextObjects.CTHCreateTextObject(WindowerHelper.Text, txtName)
    End Sub

    Public Sub SetTextObj(ByVal txtName As String, ByVal txtdisplay As String, ByVal visible As Boolean,
                          ByVal bold As Boolean, ByVal italic As Boolean)
        WindowerTextObjects.CTHSetText(WindowerHelper.Text, txtName, txtdisplay)
        WindowerTextObjects.CTHSetVisibility(WindowerHelper.Text, txtName, visible)
        WindowerTextObjects.CTHSetBold(WindowerHelper.Text, txtName, bold)
        WindowerTextObjects.CTHSetItalic(WindowerHelper.Text, txtName, italic)
        WindowerTextObjects.CTHSetFont(WindowerHelper.Text, txtName, 0, 10)
    End Sub

    Public Sub FontTextObj(txtname As String, font As Byte, size As Integer)
        WindowerTextObjects.CTHSetFont(WindowerHelper.Text, txtname, font, size)
    End Sub

    Public Sub LocTextObj(ByVal txtName As String, ByVal x As Single, ByVal y As Single)
        WindowerTextObjects.CTHSetLocation(WindowerHelper.Text, txtName, x, y)
    End Sub

    Public Sub ColorTextObj(ByVal txtName As String, ByVal r As Byte, ByVal g As Byte,
                          ByVal b As Byte, ByVal a As Byte)
        WindowerTextObjects.CTHSetColor(WindowerHelper.Text, txtName, a, r, g, b)
    End Sub

    Public Sub BGTextObj(ByVal txtName As String, ByVal visible As Boolean,
                         ByVal r As Byte, ByVal g As Byte, ByVal b As Byte, ByVal a As Byte)
        WindowerTextObjects.CTHSetBGColor(WindowerHelper.Text, txtName, a, r, g, b)
        WindowerTextObjects.CTHSetBGVisibility(WindowerHelper.Text, txtName, visible)
    End Sub

    Public Sub DeleteTextObj(ByVal txtName As String)
        WindowerTextObjects.CTHDeleteTextObject(WindowerHelper.Text, txtName)
    End Sub

    Public Sub Flush()
        WindowerTextObjects.CTHFlushCommands(WindowerHelper.Text)
    End Sub
End Class
